<?php
session_start();
$user = "user";
$time = date("Y-m-d-h-i-s");
$extension = substr($_FILES["fileName"]["name"],strripos($_FILES["fileName"]["name"],"."),strlen($_FILES["fileName"]["name"])-strripos($_FILES["fileName"]["name"],".")+1);
$fileName = $user."-".$time.$extension;
if($moved = move_uploaded_file($_FILES["fileName"]["tmp_name"],"recieved/".$fileName))
{
	echo "Done";
	echo "recieved/".$fileName;
}
else
{
	echo "Error";
}

?>